package com.xjtu.platform.security.login.dao;

import com.xjtu.platform.security.login.LoginDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface LoginDao {

    @Select("select count(user_id) from user where user_id=#{user_id} and user_pwd=#{user_pwd}")
    int checkLogin(LoginDto dto);

    @Select("select role_web from role_model,user,role where user.user_id=#{user_id} and role.role_id=user.role_id and role_model.role_id=role.role_id ")
    String finWebById(LoginDto dto);

    @Select("select count(user_id) from user where user_id=#{user_id}")
    int checkUser(LoginDto dto);
}
